Package com.cisco.pt.ipc.sim.impl
Class HTTPServerImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ProcessImpl
com.cisco.pt.ipc.sim.impl.HTTPServerImpl
- All Implemented Interfaces:
IPCObject,HTTPServer,Process
- Direct Known Subclasses:
HTTPsServerImpl
Information provided by the PKI file:
\class HttpServer
\brief HttpServer handles and manipulates the HTTP server on devices.
\example network().getDevice("Server0").getProcess("HttpServer")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionHTTPServerImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionInformation provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:booleanInformation provided by the PKI file:voidsetEnable(boolean bEnable) Information provided by the PKI file:voidsetPageContents(String url, String contents) Information provided by the PKI file:voidsetPassword(String password) Information provided by the PKI file:voidsetPortNumber(Short port) Information provided by the PKI file:voidsetUsername(String username) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.ProcessImpl
getOwnerDeviceMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Constructor Details
-
HTTPServerImpl
public HTTPServerImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
setPortNumber
Information provided by the PKI file:
\brief Sets the port number of the HTTP service. \param num, the port number to set the HTTP service to.- Specified by:
setPortNumberin interfaceHTTPServer- Parameters:
port- Takes in a parameter of port
-
getPortNumber
Information provided by the PKI file:
\brief Returns the port number of the HTTP service. \return int, the port number of the HTTP service.- Specified by:
getPortNumberin interfaceHTTPServer- Returns:
- Short Returns a Short
-
setEnable
public void setEnable(boolean bEnable) Information provided by the PKI file:
\brief Enables or disables the HTTP service. \param bEnable, true to enable the HTTP service, false to disable it.- Specified by:
setEnablein interfaceHTTPServer- Parameters:
bEnable- Takes in a parameter of bEnable
-
isEnabled
public boolean isEnabled()Information provided by the PKI file:
\brief Returns true if the HTTP service is enabled, otherwise false. \return bool, true if the HTTP service is enabled, otherwise false.- Specified by:
isEnabledin interfaceHTTPServer- Returns:
- boolean Returns a boolean
-
getPage
Information provided by the PKI file:
\brief Returns the page contents at the specified URL. \param url, the URL of the page of interest. \return string, the page contents at the specified URL.- Specified by:
getPagein interfaceHTTPServer- Parameters:
url- Takes in a parameter of url- Returns:
- String Returns a String
-
setPageContents
Information provided by the PKI file:
\brief Sets the page contents at the specified URL. \param url, the URL of the page of interest. \param contents, the contents of the page of interest.- Specified by:
setPageContentsin interfaceHTTPServer- Parameters:
url- Takes in a parameter of urlcontents- Takes in a parameter of contents
-
getUsername
Information provided by the PKI file:
\brief Returns the htaccess username for the HTTP server. \return string, the htaccess username for the HTTP server.- Specified by:
getUsernamein interfaceHTTPServer- Returns:
- String Returns a String
-
getPassword
Information provided by the PKI file:
\brief Returns the htaccess password for the HTTP server. \return string, the htaccess password for the HTTP server.- Specified by:
getPasswordin interfaceHTTPServer- Returns:
- String Returns a String
-
setUsername
Information provided by the PKI file:
\brief Sets the htaccess username for the HTTP server. \param username, the htaccess username for the HTTP server.- Specified by:
setUsernamein interfaceHTTPServer- Parameters:
username- Takes in a parameter of username
-
setPassword
Information provided by the PKI file:
\brief Sets the htaccess password for the HTTP server. \param password, the htaccess password for the HTTP server.- Specified by:
setPasswordin interfaceHTTPServer- Parameters:
password- Takes in a parameter of password
-